<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/Mock.js/1.0.1-beta3/mock-min.js"></script>
</head>
<body>
    <script>
        //mockjs随机模拟数据的扩展
        Mock.Random.extend({
            fun:function(data){
                var arr=['白羊座','金牛座','双子座','巨蟹座','狮子座','处女座','天秤座','天蝎座','射手座','摩羯座','水瓶座','双鱼座']
                return this.pick(arr)
            }
        })
        var data=Mock.mock({
            "list|1-5":[
                {
                    "xingzuo":"@fun"
                }
            ]
        }) 
        console.table(data.list)        
    </script>
</body>
</html>